﻿<UserControl x:Class="AutoCorrelatorGUI.View.DataDisplayView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:p="clr-namespace:AutoCorrelatorGUI.Properties"
      xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf"
      xmlns:util="clr-namespace:AutoCorrelatorGUI.Utility"
      xmlns:comutil="clr-namespace:Common.Utility;assembly=Common"
      xmlns:comvm="clr-namespace:Common.ViewModel;assembly=Common"
      xmlns:model="clr-namespace:AutoCorrelatorGUI.Model"
      xmlns:vm="clr-namespace:AutoCorrelatorGUI.ViewModel"
      xmlns:local="clr-namespace:AutoCorrelatorGUI.View" mc:Ignorable="d"
      d:DesignHeight="332.609" d:DesignWidth="472.174" Background="White" MinHeight="250"
      MinWidth="370">
   <UserControl.Resources>
      <vm:PlotDisplayViewModel x:Key="PlotVM" />
      <vm:InputDisplayViewModel x:Key="InputVM" />
      <vm:OutputDisplayViewModel x:Key="OutputVM" />
      <vm:PeakTroughDisplayViewModel x:Key="PeakTroughVM" />
      <vm:ComparisonDisplayViewModel x:Key="ComparisonVM" />
      <vm:FourierDisplayViewModel x:Key="FourierVM" />
      <vm:PowerDisplayViewModel x:Key="PowerVM" />
      <vm:WaveletDisplayViewModel x:Key="WaveletVM" />
      <util:RowContentConverter x:Key="rowContentConverter" />
      <comutil:ColorToBrushConverter x:Key="colorToBrushConverter" />
      <comutil:ComplimentaryBrushConverter x:Key="complimentaryBrushConverter" />
      <comvm:WellBaseComparer x:Key="WellComparer" />
   </UserControl.Resources>
   <Grid>
      <TabControl Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
            VerticalContentAlignment="Stretch">
         <TabItem DataContext="{DynamicResource PlotVM}">
            <TabItem.Header>
               <TextBlock Text="Plot" ToolTip="{x:Static p:Resources.TT_Tab_Plot}" />
            </TabItem.Header>
            <Grid>
               <oxy:PlotView x:Name="Plot" Model="{Binding PlotViewModel, Mode=OneWay}"
                     Margin="0" VerticalContentAlignment="Stretch"
                     HorizontalContentAlignment="Stretch" />
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource InputVM}">
            <TabItem.Header>
               <TextBlock Text="Input Data"
                     ToolTip="{x:Static p:Resources.TT_Tab_InputData}" />
            </TabItem.Header>
            <Grid>
               <DataGrid
                     comutil:DataGridColumnsBehavior.BindableColumns="{Binding InputDataColumnCollection}"
                     AutoGenerateColumns="False"
                     ItemsSource="{Binding InternalWellDataView}"
                     AlternatingRowBackground="#FFDEF9FF" CanUserDeleteRows="False"
                     CanUserReorderColumns="False" CanUserSortColumns="True"
                     FrozenColumnCount="1" comutil:CustomSort.AllowCustomSort="True"
                     Margin="0" comutil:MultiSelect.IsEnabled="True">
                  <DataGrid.RowStyle>
                     <Style TargetType="{x:Type DataGridRow}">
                        <Style.Triggers>
                           <DataTrigger Binding="{Binding Visible}" Value="False">
                              <Setter Property="Visibility" Value="Collapsed" />
                           </DataTrigger>
                        </Style.Triggers>
                     </Style>
                  </DataGrid.RowStyle>
               </DataGrid>
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource OutputVM}">
            <TabItem.Header>
               <TextBlock Text="Output Data"
                     ToolTip="{x:Static p:Resources.TT_Tab_OutputData}" />
            </TabItem.Header>
            <Grid>
               <Grid.RowDefinitions>
                  <RowDefinition Height="*" />
                  <RowDefinition Height="Auto" />
               </Grid.RowDefinitions>
               <DataGrid
                     comutil:DataGridColumnsBehavior.BindableColumns="{Binding OutputDataColumnCollection}"
                     AutoGenerateColumns="False"
                     ItemsSource="{Binding InternalWellDataView}"
                     AlternatingRowBackground="#FFDEF9FF" CanUserDeleteRows="False"
                     CanUserReorderColumns="False" CanUserSortColumns="True"
                     FrozenColumnCount="1" comutil:CustomSort.AllowCustomSort="True"
                     Margin="0" comutil:MultiSelect.IsEnabled="True">
                  <DataGrid.RowStyle>
                     <Style TargetType="{x:Type DataGridRow}">
                        <Style.Triggers>
                           <DataTrigger Binding="{Binding Visible}" Value="False">
                              <Setter Property="Visibility" Value="Collapsed" />
                           </DataTrigger>
                        </Style.Triggers>
                     </Style>
                  </DataGrid.RowStyle>
               </DataGrid>
               <Button Content="Save Data" HorizontalAlignment="Right"
                     VerticalAlignment="Bottom" Width="75"
                     Command="{Binding SaveOutputDataCommand, Mode=OneWay}" Grid.Row="1" />
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource PeakTroughVM}">
            <TabItem.Header>
               <TextBlock Text="Peak/Trough Data"
                     ToolTip="{x:Static p:Resources.TT_Tab_Analysis}" />
            </TabItem.Header>
            <Grid>
               <DataGrid AutoGenerateColumns="False"
                     ItemsSource="{Binding InternalWellDataView}"
                     AlternatingRowBackground="#FFDEF9FF" CanUserDeleteRows="False"
                     CanUserReorderColumns="True" CanUserSortColumns="True"
                     FrozenColumnCount="1" Margin="0" IsReadOnly="True"
                     comutil:CustomSort.AllowCustomSort="True"
                     comutil:MultiSelect.IsEnabled="True">
                  <DataGrid.Columns>
                     <DataGridTextColumn Binding="{Binding Title, Mode=OneTime}"
                           Header="ID">
                        <DataGridTextColumn.ElementStyle>
                           <Style TargetType="{x:Type TextBlock}">
                              <Setter Property="Background"
                                    Value="{Binding Color, Converter={StaticResource colorToBrushConverter}}" />
                           </Style>
                        </DataGridTextColumn.ElementStyle>
                     </DataGridTextColumn>
                     <DataGridTextColumn Binding="{Binding Analysis.ZeroCrossings   }"
                           Header="Zero X's"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                        <DataGridTextColumn.HeaderStyle>
                           <Style TargetType="DataGridColumnHeader">
                              <Setter Property="ToolTip"
                                    Value="{x:Static p:Resources.TT_Analysis_ZeroCrossings}" />
                           </Style>
                        </DataGridTextColumn.HeaderStyle>
                     </DataGridTextColumn>
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak0Val  , StringFormat=G5}"
                           Header="Max AMP"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough1Val, StringFormat=G5}"
                           Header="Trough 1 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough1Hz , StringFormat=G5}"
                           Header="Trough 1 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough2Val, StringFormat=G5}"
                           Header="Trough 2 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough2Hz , StringFormat=G5}"
                           Header="Trough 2 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough3Val, StringFormat=G5}"
                           Header="Trough 3 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough3Hz , StringFormat=G5}"
                           Header="Trough 3 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough4Val, StringFormat=G5}"
                           Header="Trough 4 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Trough4Hz , StringFormat=G5}"
                           Header="Trough 4 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak1Val  , StringFormat=G5}"
                           Header="Peak 1 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak1Hz   , StringFormat=G5}"
                           Header="Peak 1 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak2Val  , StringFormat=G5}"
                           Header="Peak 2 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak2Hz   , StringFormat=G5}"
                           Header="Peak 2 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak3Val  , StringFormat=G5}"
                           Header="Peak 3 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak3Hz   , StringFormat=G5}"
                           Header="Peak 3 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak4Val  , StringFormat=G5}"
                           Header="Peak 4 Val"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                     <DataGridTextColumn
                           Binding="{Binding Analysis.Peak4Hz   , StringFormat=G5}"
                           Header="Peak 4 Hz"
                           comutil:CustomSort.CustomSorter="{StaticResource WellComparer}" />
                  </DataGrid.Columns>
                  <DataGrid.RowStyle>
                     <Style TargetType="{x:Type DataGridRow}">
                        <Style.Triggers>
                           <DataTrigger Binding="{Binding Visible}" Value="False">
                              <Setter Property="Visibility" Value="Collapsed" />
                           </DataTrigger>
                        </Style.Triggers>
                     </Style>
                  </DataGrid.RowStyle>
               </DataGrid>
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource FourierVM}">
            <TabItem.Header>
               <TextBlock Text="Fourier" ToolTip="{x:Static p:Resources.TT_Tab_Fourier}" />
            </TabItem.Header>
            <Grid>
               <Grid.RowDefinitions>
                  <RowDefinition Height="Auto" />
                  <RowDefinition />
               </Grid.RowDefinitions>
               <GroupBox Header="Options" VerticalAlignment="Top">
                  <Grid>
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="*" />
                     </Grid.ColumnDefinitions>
                     <TextBlock Text="Line Style" TextTrimming="CharacterEllipsis"
                           Padding="2,3,0,0" Height="22" VerticalAlignment="Top"
                           ToolTip="{x:Static p:Resources.TT_Fourier_LineStyle}" />
                     <ComboBox VerticalAlignment="Top" Grid.Column="1"
                           HorizontalContentAlignment="Stretch"
                           ItemsSource="{Binding LineStyleOptionList}"
                           SelectedValuePath="Key" DisplayMemberPath="Value"
                           SelectedValue="{Binding LineStyleChoice}"
                           ToolTip="{x:Static p:Resources.TT_Fourier_LineStyle}" />
                  </Grid>
               </GroupBox>
               <oxy:PlotView Model="{Binding PlotViewModel, Mode=OneWay}" Margin="0"
                     VerticalContentAlignment="Stretch"
                     HorizontalContentAlignment="Stretch" Grid.Row="1" />
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource PowerVM}">
            <TabItem.Header>
               <TextBlock Text="Power" ToolTip="{x:Static p:Resources.TT_Tab_Power}" />
            </TabItem.Header>
            <Grid>
               <oxy:PlotView Model="{Binding PlotViewModel, Mode=OneWay}" Margin="0"
                     VerticalContentAlignment="Stretch"
                     HorizontalContentAlignment="Stretch" />
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource WaveletVM}">
            <TabItem.Header>
               <TextBlock Text="Wavelet" ToolTip="{x:Static p:Resources.TT_Tab_Wavelet}" />
            </TabItem.Header>
            <Grid>
               <oxy:PlotView Model="{Binding PlotViewModel, Mode=OneWay}" Margin="0"
                     VerticalContentAlignment="Stretch"
                     HorizontalContentAlignment="Stretch" />
            </Grid>
         </TabItem>
         <TabItem DataContext="{DynamicResource ComparisonVM}">
            <TabItem.Header>
               <TextBlock Text="Comparison"
                     ToolTip="{x:Static p:Resources.TT_Tab_Comparison}" />
            </TabItem.Header>
            <DataGrid AutoGenerateColumns="False"
                  ItemsSource="{Binding InternalWellDataView}"
                  AlternatingRowBackground="#FFDEF9FF" CanUserDeleteRows="False"
                  CanUserReorderColumns="True" CanUserSortColumns="True"
                  FrozenColumnCount="1" Margin="0" IsReadOnly="True"
                  comutil:MultiSelect.IsEnabled="True" ColumnWidth="Auto">
               <DataGrid.Columns>
                  <DataGridTextColumn Binding="{Binding Title, Mode=OneTime}" Header="ID">
                     <DataGridTextColumn.ElementStyle>
                        <Style TargetType="{x:Type TextBlock}">
                           <Setter Property="Background"
                                 Value="{Binding Color, Converter={StaticResource colorToBrushConverter}}" />
                        </Style>
                     </DataGridTextColumn.ElementStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.OutputCorrelation     , StringFormat=G5}"
                        Header="Output Correlation"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Correlation}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.OutputRMSTotal        , StringFormat=G5}"
                        Header="Output RMS Total"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_RMS}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.OutputArea            , StringFormat=G5}"
                        Header="Output Area"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Area}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.OutputMaxDiff         , StringFormat=G5}"
                        Header="Output Max Diff"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Max}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.FFTCorrelation     , StringFormat=G5}"
                        Header="FFT Correlation"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Correlation}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.FFTRMSTotal        , StringFormat=G5}"
                        Header="FFT RMS Total"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_RMS}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.FFTArea            , StringFormat=G5}"
                        Header="FFT Area"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Area}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.FFTMaxDiff         , StringFormat=G5}"
                        Header="FFT Max Diff"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Max}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.PowerCorrelation     , StringFormat=G5}"
                        Header="Power Correlation"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Correlation}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.PowerRMSTotal        , StringFormat=G5}"
                        Header="Power RMS Total"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_RMS}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.PowerArea            , StringFormat=G5}"
                        Header="Power Area"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Area}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.PowerMaxDiff         , StringFormat=G5}"
                        Header="Power Max Diff"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Max}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.WaveletCorrelation     , StringFormat=G5}"
                        Header="Wavelet Correlation"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Correlation}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.WaveletRMSTotal        , StringFormat=G5}"
                        Header="Wavelet RMS Total"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_RMS}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.WaveletArea            , StringFormat=G5}"
                        Header="Wavelet Area"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Area}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
                  <DataGridTextColumn
                        Binding="{Binding Comparison.WaveletMaxDiff         , StringFormat=G5}"
                        Header="Wavelet Max Diff"
                        comutil:CustomSort.CustomSorter="{StaticResource WellComparer}">
                     <DataGridTextColumn.HeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                           <Setter Property="ToolTip"
                                 Value="{x:Static p:Resources.TT_Diff_Max}" />
                        </Style>
                     </DataGridTextColumn.HeaderStyle>
                  </DataGridTextColumn>
               </DataGrid.Columns>
               <DataGrid.RowStyle>
                  <Style TargetType="{x:Type DataGridRow}">
                     <Style.Triggers>
                        <DataTrigger Binding="{Binding Visible}" Value="False">
                           <Setter Property="Visibility" Value="Collapsed" />
                        </DataTrigger>
                     </Style.Triggers>
                  </Style>
               </DataGrid.RowStyle>
            </DataGrid>
         </TabItem>
      </TabControl>
   </Grid>
</UserControl>
